﻿@model AntUnion.FrameWork.Model.Models.Mt5User
@{
    ViewData["Title"] = "Index";
    Layout = "~/Areas/Console/Views/Shared/_Layout.cshtml";
}

<script>
    /^http(s*):\/\//.test(location.href) || alert('请先部署到 localhost 下再访问');

    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }

    function Logout() {
        window.location.href = '/Home/Logout?language=' + document.getElementById("languageSelect").value;
    }
</script>
@section head{
    <script type="text/javascript">
        var table;
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'table', 'form'], function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , table = layui.table;
            top.SetListPageLanguage(layui);
            $('#rebateWalletTip').attr('title', top.lang.rebateWalletTip);
            $('#mt5Tip').attr('title', top.lang.mt5Tip);
            $("#gotoSetPersonal").click(function () {
                parent.layui.index.openTabsPage("/Personal/Index");
                //初始化导航选项卡（选中新建标签卡）
                parent.layui.element.render('nav');
            });
        });
    </script>
}
    <div class="layui-fluid">
        <div class="layui-card-body" style="padding: 10px 0;">
            <div class="layui-card welcome">
                <div class="layui-row">
                    <div class="layui-col-md12">
                        <div class="layui-col-xs12 layui-col-md6">
                            <div class="left">
                                <div>Welcome @ViewBag.loginName </div>
                            </div>
                        </div>
                        <div class="layui-col-xs12 layui-col-md6">
                            <div class="right">
                                <div><span lay-event="lastLoginTime">最近登录</span>@ViewBag.lastTime</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row layui-col-space15">
            <div class="layui-col-xs12">
                <div class="layui-card overview-card">
                    <div class="layui-card-header"><h2 lay-event="quickEntry">快捷入口</h2></div>
                    <div class="layui-card-body">
                        <div class="layui-col-xs3">
                            <div class="crm-ico">
                                <a href="/Deposit/Deposit">
                                    <span><i class="layui-icon layui-icon-dollar"></i></span>
                                    <div lay-event="deposit">充值</div>
                                </a>
                            </div>
                        </div>
                        <div class="layui-col-xs3">
                            <div class="crm-ico">
                                <a href="/Withdraw/Withdraw">
                                    <span><i class="layui-icon layui-icon-dollar"></i></span>
                                    <div lay-event="withdraw">提现</div>
                                </a>
                            </div>
                        </div>
                        <div class="layui-col-xs3">
                            <div class="crm-ico">
                                <a href="/Personal/Index">
                                    <span><i class="layui-icon layui-icon-user"></i></span>
                                    <div lay-event="personalCenter">个人中心</div>
                                </a>
                            </div>
                        </div>
                        <div class="layui-col-xs3">
                            <div class="crm-ico">
                                <a href="/Assets/AuditRecords">
                                    <span><i class="layui-icon layui-icon-list"></i></span>
                                    <div lay-event="auditRecords">审核记录</div>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs12 layui-col-md4">
                <div class="layui-card overview-card">
                    <div class="layui-card-header"><h2 lay-event="rebateWallet">返佣钱包</h2><i class="layui-icon layui-icon-tips" id="rebateWalletTip"></i></div>
                    <div class="layui-card-body crm-money">
                        <div>@ViewBag.currency</div>
                        <div>@ViewBag.Balance</div>
                        <div lay-event="availableFunds">可用资金</div>
                        <div><span lay-event="updateTime">更新时间</span> @ViewBag.crmWalletUpdateTime</div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs12 layui-col-md4">
                <div class="layui-card overview-card">
                    <div class="layui-card-header"><h2 lay-event="tradingWallet">返佣钱包</h2><i class="layui-icon layui-icon-tips" id="mt5Tip"></i></div>
                    <div class="layui-card-body crm-money">
                        <div>@ViewBag.mt5Currency</div>
                        <div>@ViewBag.mt5Balance</div>
                        <div lay-event="availableFunds">可用资金</div>
                        <div><span lay-event="updateTime">更新时间</span> @ViewBag.mt5UpdateTime</div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs12 layui-col-md4">
                <div class="layui-card overview-card">
                    <div class="layui-card-header">
                        <h2 lay-event="tradingAccountNo">交易账号</h2>
                    </div>
                    <div class="layui-card-body crm-money">
                        <div lay-event="mt5usertitle">MT5账号</div>
                    @if (ViewBag.hasMt5)
                    {
                        <div>@ViewBag.Login</div>
                    }
                    else
                    {
                        <div class="layui-col-md12">
                            <button type="button" class="layui-btn" id="gotoSetPersonal" lay-event="gotoSePersonal">请先完善您的个人信息</button>
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</div>